﻿Imports System.Data.OleDb
Public Class CDaTaProviderDAO

    Public Shared Function ConnectDB() As OleDbConnection
        Dim _strchuoiketnoi As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=QuanLyHocSinh.mdb"
        Dim cnn As New OleDbConnection(_strchuoiketnoi)
        Return cnn
    End Function

    Public Shared Function ConnectExcel() As OleDbConnection
        Dim _strexcel As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=HocSinh.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
        Dim _cnn As New OleDbConnection(_strexcel)
        Return _cnn
    End Function
End Class
